<!doctype html>
<html>
<body>
<pre id='console'></pre>
<script src="../resources/setup-for-read-common.js"></script>
<script>
var testConstructedFileList = [
    { 'name': 'text-file',
      'contents': ['This is just', ' some text'],
      'type': 'text/plain' },
    { 'name': 'empty-file',
      'contents': [],
      'type' : 'text/plain',
      'modified' : 20000},
    { 'name': 'array-buffer',
      'contents': [(new Uint8Array([1,2,3,4,5])).buffer],
      'type' : 'application/octet-stream',
      'modified' : new Date("2010-01-01T12:13:24Z")},
];

function startTest()
{
    log('Reading the cloned contents of Files constructed programmatically.');
    testFiles = testConstructedFileList.map(function(f) {
        return new File(f.contents, f.name, {type: f.type, lastModified: f.modified || 0});
    });
    startWorker(testFiles, "resources/worker-read-file-constructor-async.js");
}

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}
startTest();
</script>
</body>
</html>
